package stool.chainofresponsibility;

/**
 * @Author Felix YF Dong
 * @Date 2021/5/13
 */
public class Main {

    public static void main(String[] args) {

        CommonManager commonManager = new CommonManager("common manager");
        Majordomo majordomo = new Majordomo("majordomo");
        GeneralManager generalManager = new GeneralManager("general manager");
        commonManager.setSuperior(majordomo);
        majordomo.setSuperior(generalManager);

        Request request = new Request();
        request.setRequestType(RequestTypeEnum.LEAVE);
        commonManager.requestApplication(request);
        Request request2 = new Request();
        request2.setRequestType(RequestTypeEnum.OT);
        commonManager.requestApplication(request2);
        Request request3 = new Request();
        request3.setRequestType(RequestTypeEnum.PAY_RISE);
        commonManager.requestApplication(request3);
        Request request4 = new Request();
        request4.setRequestType(RequestTypeEnum.PROMOTION);
        commonManager.requestApplication(request4);

    }
}
